/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package me.report.api.web.controller.view;

import me.report.api.web.util.Constant;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 * @author ME
 */
@Controller
public class ViewController {

    @RequestMapping("report/run/id/{reportIdFile}")
    public String runReportById(@PathVariable("reportIdFile") String reportIdFile,
            ModelMap model) {
        model.addAttribute("reportUrl", Constant.URL_ADMIN_REPORT_FILE_ID + reportIdFile );
        model.addAttribute("birtViewerUrl", Constant.URL_BIRT_VIEWER);
        return "report/run";
    }
}
